/*!
 * \file wls_parse_message.h
 *
 * \brief weblogic message解析
 *
 * All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.\n
 *
 * \version 2.0
 * \author wuwk
 * \date 2015/11/20
 *
 */
#ifndef _WLS_PARSE_MESSAGE_H_
#define _WLS_PARSE_MESSAGE_H_

#include "frreport_comm.h"
#include "frbyte_buffer.h"

#define MQ_METHOD_REQ                   "request.mq.method"
#define MQ_METHOD_RESP                  "response.mq.method"

#define  MQ_REQ_QUE                     "request.mq.queue"
#define  MQ_REQ_TOPIC                   "request.mq.topic"

#define MQ_SUB                          APM_REPORT_KEY_SUB".mq"
#define MQ_SUB_QUE                      MQ_SUB".topic"

#define MQ_NOTIFY                       APM_REPORT_KEY_NOTIFY".mq"
#define MQ_NOTIFY_QUE                   MQ_NOTIFY".queue"
#define MQ_NOTIFY_TOPIC                 MQ_NOTIFY".topic"

#define MQ_REPOER_MQ_MSG_TYPE           "mq.message_type"

#define MQ_REPORT_MESSAGE_SIZE          "mq.message.size"

#define WLS_REPORT_KEY_QUEUE               APM_REPORT_KEY_SESSION ".mq.queue"
#define WLS_REPORT_KEY_TOPIC               APM_REPORT_KEY_SESSION ".mq.topic"
#define WLS_REPORT_KEY_WEBL_SERVER         APM_REPORT_KEY_SESSION ".mq.weblogic.server"
#define WLS_REPORT_KEY_WEBL_JMS_SERVER     APM_REPORT_KEY_SESSION ".mq.weblogic.jms.server"
#define WLS_REPORT_KEY_WEBL_JMS_MODULE     APM_REPORT_KEY_SESSION ".mq.weblogic.jms.module"

#define WLS_BYTEMESSAGE         0x01
#define WLS_MESSAGE             0x02
#define WLS_MAPMESSAGE          0x03
#define WLS_OBJMESSAGE          0x04
#define WLS_STREAMMESSAGE       0x05
#define WLS_TEXTMESSAGE         0x06

int wls_skip_utf(Frbyte_Packet *p_st_data);
int wls_request_read(Frbyte_Packet *p_st_data, int is_iiop);
int wls_skip_property(Frbyte_Packet *p_st_data);
int wls_backend_destination_id(Frbyte_Packet *p_st_data, int i_stub_start, int is_iiop);
int wls_skip_dispatcher_id(Frbyte_Packet *p_st_data, int is_iiop);
int wls_read_consumer_reconnectinfo(Frbyte_Packet *p_st_data);
int wls_analysis_textmessage(Frbyte_Packet *p_st_data
                           , Frreport_body_data *p_st_body_data
                           , char *p_key
                           , int i_index
                           , int is_iiop
                           , int i_stub_start);
int wls_analysis_mapmessage(Frbyte_Packet *p_st_data
                          , Frreport_body_data *p_st_body_data
                          , char *p_key
                          , int i_index
                          , int is_iiop
                          , int i_stub_start);
int wls_analysis_objmessage(Frbyte_Packet *p_st_data
                          , Frreport_body_data *p_st_body_data
                          , char *p_key
                          , int i_index
                          , int is_iiop
                          , int i_stub_start);
int wls_message_analysis(Frbyte_Packet *p_st_data
                       , Frreport_body_data *p_st_body_data
                       , char *p_key
                       , int is_iiop
                       , int i_stub_start);

#endif
